Focusing on the spectrum allocation problem in cognitive radio network, an allocation model considering spectrum availability was proposed. When handling the constraint, the higher availability spectrum was assigned to the cognitive users. A chaotic artificial physics optimization was proposed based on NP (Non-deterministic Polynomial) feature of spectrum allocation problem. The ergodicity of chaos was used to initiate population and the force equation between particles was improved to avoid the algorithm falling into local optimum. The simulation results show that the proposed algorithm can get better network revenue and improve the spectrum usage.